﻿namespace Borg.Framework
{
    public static class SelectedPlugProvider
    {
        public static int SelectedPlugIndex(SlotInfo slot)
        {
            var selectedPlug = slot.SelectedPlug;

            if (selectedPlug == null)
                return -1;

            return slot.PluggedPlugInfos.IndexOf(selectedPlug);
        }
    }
}

